import {Component} from "@angular/core";
import {HeaderComponent} from "./header.component";
import {CarouselComponent} from "./carousel.component";
import {SidebarComponent} from "./sidebar.component";
import {FooterComponent} from "./footer.component";
import {ProductService} from "./service/product.service";
import {Product} from "./entity/product";
// <h1>hello angularJs2</h1>
// <button (click)="demo()">click</button>

@Component({
    selector: 'my-app',
    templateUrl:`./app/app-index.html`,
    directives:[HeaderComponent,CarouselComponent,SidebarComponent,FooterComponent],
    providers:[ProductService]
})
export class AppComponent {
    private productArray:Product[];

    constructor(productService:ProductService){
        this.productArray = productService.getAll();
    }
}
